Repository navigation
fix: hide the header or footer of a section when its content is hidden - #1370
Merged
Merged
Conversation
When a child with putInto="header" or putInto="footer" of a Section became invisible, the header or footer stayed on the screen until something else rendered the section again. Widgets now render again when one of their components, such as the header and footer of a Section, is shown or hidden.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a child with
putInto="header"orputInto="footer"of aSectionbecame invisible, the header or footer stayed on the screen until something else rendered the section again. Widgets now render again when one of their components, such as the header and footer of aSection, is shown or hidden.Cause
Containers render again when the list of their visible children changes (
Container.exploreItemscachesinstance.children), butWidget.exploredid not track its components: a component that became invisible was left out ofinstance.components, but the widget was not marked for rendering, so its previous output stayed.Widget.explorenow caches the names of the visible components and marks the widget for rendering when they change.This applies to all widgets with components; the only effect is an additional render when a component is shown or hidden.
Tests
ui/Widget.browser.spec.tsx: "are removed from the rendering when they are hidden", with the footer of aSectionthat is hidden and shown again. It fails without the fix.